package cn.edu.scau.cmi.huangxiaodong.comprehensive;

import org.springframework.context.ApplicationContext;

import cn.edu.scau.cmi.huangxiaodong.mybatis.entity.StudentEntity;
import cn.edu.scau.cmi.huangxiaodong.spring.ApplicationContextUtil;

public class SpringSingletonApplicationContextController {

          public static void start() {
           	 
        		ApplicationContext applicationContext = ApplicationContextUtil.getApplicationContext();
        		//	Teacher  teacher=(Teacher)applicationContext.getBean("Teacher");
        			StudentEntity stu=(StudentEntity)applicationContext.getBean("Student");
        		System.out.println(stu.getName()+"的毕业设计指导导师是："+stu.getTutor().getName());
        		}
            	  	 
             }

